﻿<%@ page language="java" import="java.util.*,com.tjsinfo.tjsoa.common.DealString,org.json.JSONArray" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ page import="com.tjsinfo.tjsoa.articles.vo.TIndexArticles"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String url = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
DealString ds = new DealString();
TIndexArticles iarticles=null;

String zyxw=(String)request.getAttribute("zyxw");
String jtdt=(String)request.getAttribute("jtdt");
String dzxw=(String)request.getAttribute("dzxw");
List<TIndexArticles> zhongyaoxinwenList=(List)request.getAttribute("zhongyaoxinwenList");
List<TIndexArticles> jituandongtaiList=(List)request.getAttribute("jituandongtaiList");
List<TIndexArticles> dangzhengxinwenList=(List)request.getAttribute("dangzhengxinwenList");
JSONArray xinwentupianArray = (JSONArray)request.getAttribute("xinwentupianArray");
String[] today=(String[])request.getAttribute("today");
String[] tomr=(String[])request.getAttribute("tomr");

String userID = (String)request.getAttribute("userid");
String loginname = (String)request.getAttribute("loginname");
List<TIndexArticles> tupianxinwenPicList=(List)request.getAttribute("tupianxinwenPicList");
List<TIndexArticles> jituandongtaiPicList=(List)request.getAttribute("jituandongtaiPicList");
List<TIndexArticles> dangzhengxinwenPicList=(List)request.getAttribute("dangzhengxinwenPicList");
int articleTitleSize=36;   //中间大部分栏目标题宽度
int zxxxFirstTilteSize=20;   //最新讯息标签栏头条标题宽度
int zxxxZhaiyaoSize=100;    //最新讯息标签栏头条摘要宽度
int articleShortTitle=20;  //如果标题栏短于此数，则在标题后加上短标题内容
%>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible"content="IE=9; IE=8; IE=7; IE=EDGE"> 
<title>天津市粮油集团有限公司</title>
<meta name="keywords" content="粮油" />
<link href="<%=basePath%>articles/style/test.css" type="text/css" rel="stylesheet" />
<script src="<%=basePath%>articles/js/swfobject_modified.js" type="text/javascript"></script>
<script src="<%=basePath%>articles/js/swfobject.js" language="JavaScript" type="text/javascript" ></script>
<script src="<%=basePath%>articles/js/change.js" type="text/javascript" ></script>

<!-- 日历控件 -->								  
<script type="text/javascript" src="<%=basePath %>js/common/system/time.js"></script>

<!-- 幻灯装束 -->								
<link href="<%=basePath %>articles/style/cutover.css" rel="stylesheet" type="text/css" />
<SCRIPT src="<%=basePath %>articles/js/cutover/jquery1.4.2.js" type=text/javascript></SCRIPT>
<SCRIPT src="<%=basePath %>articles/js/cutover/mdcfocus.min.js" type=text/javascript></SCRIPT>
<SCRIPT src="<%=basePath %>articles/js/cutover/track.linkcollecter.js" type=text/javascript></SCRIPT>
<SCRIPT src="<%=basePath %>articles/js/cutover/focus_image.js" type=text/javascript></SCRIPT>

<script type="text/javascript">
$(document).ready(function(){
<%if(null!=userID){%>
		$.getJSON("<%= basePath%>tjsinfo/tjsoa/system/daiban.do",{random:Math.random()}, 
		function(response){ 
		     var fawen=response.fawendaiban;
		     if(fawen != 0){
		     $("#filefw").append('您有(<font color="red" id="fw">' + response.fawendaiban + '</font>)项发文待办');
		     blink('fw');
		     }else{
		     $("#filefw").append("您有(" + response.fawendaiban + ")项发文待办");
		     }
             var shouwen=response.shouwendaiban;
             if(shouwen != 0){
             $("#filesw").append('您有(<font color="red" id="sw">' + response.shouwendaiban + '</font>)项发文待办');
             blink('sw');
             }else{
             $("#filesw").append("您有(" + response.shouwendaiban + ")项收文待办");
             }
             var huiyi=response.huiyidaiban;
             //alert(huiyi);
             if(huiyi != 0){
             $("#fileshy").append('您有(<font color="red" id="hy">' + response.huiyidaiban + '</font>)项会议通知');
             blink('hy');
             }else{
             $("#fileshy").append("您有(" + response.huiyidaiban + ")项会议通知");
             }
   			 }); 
   	    $.getJSON("<%= basePath%>tjsinfo/tjsoa/mail/emailNewReceived.do",{random:Math.random()}, 
		function(response){      
             var mail=response.count;
             if(mail != 0){
             $("#email").append('您有(<font color="red" id="mail">' + response.count + '</font>)封新邮件');
             blink('mail');
             }else{
             $("#email").append("您有(" + response.count + ")封新邮件");
             }
   			 });
   		 $.getJSON("<%= basePath%>tjsinfo/tjsoa/reminded/remindedDaiBan.do",{random:Math.random()}, 
		 function(response){      
             var remind=response.remind;
             if(remind != 0){
             $("#remind").append('您有(<font color="red" id="mind">' + response.remind + '</font>)条特殊提醒');
             blink('mind');
             }else{
             $("#remind").append("您有(" + response.remind + ")条特殊提醒");
             }
   			 });
        <%} %>  })
</script>
<script type="text/javascript" language="javascript">
//加载
setTimeout(function(){
$("#Tem").append('<iframe allowtransparency="true" frameborder="0" width="195" height="95" scrolling="no" src="http://tianqi.2345.com/plugin/widget/index.htm?s=2&z=1&t=0&v=0&d=1&bd=0&k=0080ff&f=000000&q=1&e=1&a=1&c=54527&w=195&h=95&align=center"></iframe>');},800);//3秒后调用

function blink (elId) {
  var html = '';
  if (document.all)
    html += 'var el = document.all.' + elId + ';';
  else if (document.getElementById)
    html += 'var el = document.getElementById("' + elId + '");';
  html += 
    'el.style.visibility = ' + 
    'el.style.visibility == "hidden" ? "visible" : "hidden"';
  if (document.all || document.getElementById)
    setInterval(html, 300)
}
</script>

</head>


<body>
<div class="banner">
<div class="leftnavimg" >
    <DIV class=fi02 id=MDCFIeFaPo0zn data-track-index="@cut1|div^0|div^1|div^0" data-track="21" > </DIV>
								<SCRIPT type=text/javascript>
								jQuery("#MDCFIeFaPo0zn").focusImg({"speed":"3000", "type":"1", "flag":"fi02", "hoverStop":false},
								<%=xinwentupianArray%>
								
								);
								</SCRIPT>
  </div>
  <div class="rightnav"><div class="zxxx"><div class="title_news"><h1><%=zyxw %></h1><div class="more"><a href="<%=basePath%>tjsinfo/tjsoa/articles/List.do?method=getList&cid=991" ><img src="<%=basePath%>articles/images/more.png" /></a></div></div>
        <div class="news_content">
          <div class="biaoti">
            <%{%><% String Title="";String title="";String uuid="";
			        if(zhongyaoxinwenList.size()>0){
					iarticles=zhongyaoxinwenList.get(0);
					Title=iarticles.getTitle().replace("<br/>","");
					title=ds.SubStr(Title,zxxxFirstTilteSize);
					uuid=iarticles.getUuid();%>
                    <a href="<%=basePath%>tjsinfo/tjsoa/articles/List.do?method=viewArticle&uuid=<%=uuid %>&type=shouye" title="<%=Title %>"><%=title %></a>
			<%}%><%}%> 
          </div>
          <div class="news_con">
            <%{%><% String Smallcontent="";String smallcontent="";String uuid="";
                    if(zhongyaoxinwenList.size()>0){
                    iarticles=zhongyaoxinwenList.get(0);
                    Smallcontent=iarticles.getSmallContent().replace("<br/>","");
                    if(Smallcontent.length()>zxxxZhaiyaoSize){
                       smallcontent = ds.SubStr(Smallcontent,zxxxZhaiyaoSize) + "...";
                    }else{
					smallcontent=Smallcontent;} 
					uuid=iarticles.getUuid();%>
                    <a href="<%=basePath%>tjsinfo/tjsoa/articles/List.do?method=viewArticle&uuid=<%=uuid %>&type=shouye" class="ckxq" title="<%=Smallcontent %>"><%=smallcontent %>[查看详情]</a>
            <%}%><%}%>
           </div> 
         <ul class="news_list">
          <%{%><% String Title="";String title="";String uuid="";String createDate="";int datacha=0;
					for (int i=1;i<zhongyaoxinwenList.size();i++) {
					iarticles = zhongyaoxinwenList.get(i);   
					createDate = iarticles.getCreateDate();
					createDate=ds.substring(createDate,10);
					Title=iarticles.getTitleLong(articleShortTitle);
					title=ds.SubStr(Title,articleTitleSize);
                    datacha=iarticles.getTitleDate(title,createDate);
					uuid = iarticles.getUuid();%>
				    <li><a href="<%=basePath %>tjsinfo/tjsoa/articles/List.do?method=viewArticle&uuid=<%=uuid %>&type=shouye" class="ckxq" title="<%=Title %>"><%=title %>
				    <%if(datacha>=0 && datacha<3){%><img src="<%=basePath%>articles/images/19.gif" /><%} %>
				    </a></li>
		  <%}%><%}%>
         </ul>
        </div>
   </div>
  </div>  
</div>
<div class="clean"></div>

<div class="sidebar">
<div class="leftcontent">
     <div class="jtdt">
          <div class="title_news title_jtdt"><h1><%=jtdt %></h1><div class="more1"><a href="<%=basePath%>tjsinfo/tjsoa/articles/List.do?method=getList&cid=992"><img src="<%=basePath%>articles/images/more.png" /></a></div></div>
            <ul class="jtdt_con">
                <%{%><% String Title="";String title="";String createDate="";String uuid="";int datacha=0;
						for (int i=0;i<jituandongtaiList.size();i++) {
						iarticles = jituandongtaiList.get(i);   
						createDate = iarticles.getCreateDate();
						createDate=ds.substring(createDate,10);
						Title=iarticles.getTitleLong(articleShortTitle);
						title=ds.SubStr(Title,articleTitleSize-2);
						datacha=iarticles.getTitleDate(title,createDate);						
						uuid = iarticles.getUuid();%>
				        <li><a href="<%=basePath %>tjsinfo/tjsoa/articles/List.do?method=viewArticle&uuid=<%=uuid %>&type=shouye" style="color:;" title="<%=Title %>"><%=title %>
				        <%if(datacha>=0 && datacha<3){%><img src="<%=basePath%>articles/images/19.gif" /><%} %>
				        </a></li>
				<%}%><%}%>               
            </ul>
     </div>
     <div class="jtdt xtdt">
          <div class="title_news title_jtdt title_xtdt"><h1><%=dzxw %></h1><div class="more1"><a href="<%=basePath%>tjsinfo/tjsoa/articles/List.do?method=getList&cid=993" ><img src="<%=basePath%>articles/images/more.png" /></a></div></div>
            <ul class="jtdt_con xtdt_con">
                        <%{%><% String Title="";String title="";String createDate="";String uuid="";int datacha=0;
							for (int i=0;i<dangzhengxinwenList.size();i++) {
							iarticles = dangzhengxinwenList.get(i);       
							createDate = iarticles.getCreateDate();
						    createDate=ds.substring(createDate,10);
							Title=iarticles.getTitleLong(articleShortTitle);
							title=ds.SubStr(Title,articleTitleSize);
							datacha=iarticles.getTitleDate(title,createDate);	
							uuid = iarticles.getUuid();%>
				            <li><a href="<%=basePath %>tjsinfo/tjsoa/articles/List.do?method=viewArticle&uuid=<%=uuid %>&type=shouye"  style="color:;" title="<%=Title %>"><%=title %>
				            <%if(datacha>=0 && datacha<3){%><img src="<%=basePath%>articles/images/19.gif" /><%} %>
				        </a></li>
						<%}%><%}%>
            </ul>
     </div>
     
     <div class="leftnav">
  <div class="title_news_s"><h1>图片新闻</h1><div class="more1"></div></div>
  
    <div style="width:741px;text-align:left; padding-top:3px; border-left:2px #ccc solid;border-right:2px #ccc solid;border-bottom:2px #ccc solid;">
    <DIV id="demo" style="margin:10px 21px; OVERFLOW: hidden; WIDTH: 700px; COLOR: #ffffff; HEIGHT: 100px;" onmousemove="MoveDiv(event);" onmouseout="MoveOutDiv();">            
    <div id="demo1" style="width:100%;">
                  <TABLE cellSpacing=0 cellPadding=0>
                    <TBODY>
                    <TR vAlign=top>
                      <TD vAlign=top noWrap>
                        <DIV align=right>
        <%{%><%String pic=""; String uuid="";String Pic="";
        if(tupianxinwenPicList.size() -4 >0){
          for(int i=4;i<tupianxinwenPicList.size();i++){
           pic=tupianxinwenPicList.get(i).getSmallPic();
           uuid = tupianxinwenPicList.get(i).getUuid();
           if(pic.contains("http")){
           Pic=pic;}else{Pic=url+pic;}%>
		   <a href="<%=basePath %>tjsinfo/tjsoa/articles/List.do?method=viewArticle&uuid=<%=uuid %>&type=shouye" ><img src="<%=Pic %>" style="width:150px;height: 100px;cursor:pointer;" onmousemove="onmouseoverMy();"/></a>
		<%} } }%>
		 <%{%><%String pic=""; String uuid="";String Pic="";
        if(jituandongtaiPicList.size() >0){
          for(int i=0;i<jituandongtaiPicList.size();i++){
           pic=jituandongtaiPicList.get(i).getSmallPic();
           uuid = jituandongtaiPicList.get(i).getUuid();
           if(pic.contains("http")){
           Pic=pic;}else{Pic=url+pic;}%>
           	<a href="<%=basePath %>tjsinfo/tjsoa/articles/List.do?method=viewArticle&uuid=<%=uuid %>&type=shouye" ><img src="<%=Pic %>" style="width:150px;height: 100px;cursor:pointer;" onmousemove="onmouseoverMy();"/></a>                    
		<% } } }%>
		 <%{%><%String pic=""; String uuid="";String Pic="";
        if(dangzhengxinwenPicList.size()  >0){
          for(int i=0;i<dangzhengxinwenPicList.size();i++){
           pic=dangzhengxinwenPicList.get(i).getSmallPic();
           uuid = dangzhengxinwenPicList.get(i).getUuid();
           if(pic.contains("http")){
           Pic=pic;}else{Pic=url+pic;}%>
		   <a href="<%=basePath %>tjsinfo/tjsoa/articles/List.do?method=viewArticle&uuid=<%=uuid %>&type=shouye" ><img src="<%=Pic %>" style="width:150px;height: 100px;cursor:pointer;" onmousemove="onmouseoverMy();"/></a>
		<%} } }%>
        <img src="<%=basePath%>articles/images/10.jpg" onmousemove="onmouseoverMy();"/> 
        <img src="<%=basePath%>articles/images/16.jpg" onmousemove="onmouseoverMy();"/> 
        <img src="<%=basePath%>articles/images/16.jpg" onmousemove="onmouseoverMy();"/> 
        <img src="<%=basePath%>articles/images/4.jpg" onmousemove="onmouseoverMy();"/> 
        <img src="<%=basePath%>articles/images/5.jpg" onmousemove="onmouseoverMy();"/> 
        <img src="<%=basePath%>articles/images/6.jpg" onmousemove="onmouseoverMy();"/> 
        <img src="<%=basePath%>articles/images/10.jpg" onmousemove="onmouseoverMy();"/> 
        <img src="<%=basePath%>articles/images/16.jpg" onmousemove="onmouseoverMy();"/>    
      </DIV></TD></TR></TBODY></TABLE>
       <TD width="0">
        <div id="demo2" style="width:100%;"></div>
       </TD>
      </div>
</DIV>
<script type="text/javascript">
 document.getElementById("demo2").innerHTML = document.getElementById("demo1").innerHTML;
 MyMar=setInterval(Marquee,speed);
</script>
</div></div>
</div>
<div class="rightcontent">  
<div class="rightmenu_d">
  <div class="news_add1">
     <div class="title" >
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td width="100%"><img src="<%=basePath%>articles/images/dbgz_img.png"/></td>
            </tr>
         </table>
     </div>
     <div class="workxxl">
         <ul>
            <li><img src="<%=basePath%>articles/images/mail.png" />
            <a href="<%=basePath%>tjsinfo/tjsoa/articles/shouye.do?url=tjsinfo/tjsoa/mail/emailReceivedList.do" id="email" target="_parent"></a></li>
            <li><img src="<%=basePath%>articles/images/new_job.png" />
            <a href="<%=basePath%>frame.jsp?type=fawen" id="filefw" target="_parent" ></a></li>
            <li><img src="<%=basePath%>articles/images/file.png" />
            <a href="<%=basePath%>frame.jsp?type=shouwen" id="filesw" target="_parent"></a></li>
            <li><img src="<%=basePath%>articles/images/sys_news.png" /> 
            <a href="<%=basePath%>tjsinfo/tjsoa/articles/shouye.do?url=tjsinfo/tjsoa/reminded/remindedSendList.do" id="remind" target="_parent"></a></li>
         	<li><img src="<%=basePath%>articles/images/sys_news.png" /> 
            <a href="<%=basePath%>hyframe.jsp?type=huiyi" id="fileshy" target="_parent"></a></li>
         </ul>
     </div>
  </div>
</div>

 <div class="rightmenu">
       <td valign="top" style="height:100%;">
        <div id="gjl" style="height:100%">
 
    <div id="index_tqyb">
      <div class="tqyb">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="80">
            <!-- <td align="center" width="28%"><img src="<%=basePath%>articles/images/weather_pic.png" /></td> -->
            <td align="center" width="72%">
            <div id="Tem">
            </div></td>
        </table>
      </div>
     </div>
     <div style="width:80%; height:1px; border-bottom:1px #ccc dashed; margin:0 auto; "></div>
     <div id="index_zbb">
       <div class="zbb">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="86">
                  <tr>
                    <td align="center" width="28%">
                    <a href="<%=basePath %>resource/duty/dutynew.jsp"><img src="<%=basePath%>articles/images/zhiban.png" /></a></td>
                    <td align="left" width="72%" style="padding-left:20px">
                    今日值班：<br/>
                    <%{%><%String name="";if(today.length>0){
                     for(int i=0;i<today.length;i++){
                      name=today[i];
                      if(loginname.equals(name)){
                      %>
                      <font color="red"><%=name %>&nbsp;&nbsp;&nbsp;&nbsp;</font>
                      <%}else{%>
                      <%=name %>&nbsp;&nbsp;&nbsp;&nbsp;
                      <%}%><% }} }%><br/><br/>
                     明日值班：<br/>
                     <%{%><%String name="";if(tomr.length>0){
                     for(int i=0;i<tomr.length;i++){
                      name=tomr[i];
                      %>
                      <%=name %>&nbsp;&nbsp;&nbsp;&nbsp;
                      <%}}} %>
                    </td>					
                  </tr>
        </table>
       </div>
      </div>
     <div style="width:80%; height:1px; border-bottom:1px #ccc dashed; margin:0 auto; "></div>
         <div id="index_wnl">
       <div class="wnl">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" >
                  <tr>
                    <td align="center" width="28%">
                    <img src="<%=basePath%>articles/images/wnl04.png" /></td>
                    <td align="center" width="72%">
                    <a href="<%=basePath %>media/datetime.html" target="_blank">
                    <div id="time">
                    <script language="JavaScript" type="text/javascript">ShowTime();</script>
                    </div></a><br /></td>
                  </tr>
         </table>
       </div>
      </div>
        </div>
       </td>
     </div>
</div>
</div>
</body>

</html>
